﻿#include "targetdevice.h"


Target::Target() : Device()
{
    systemList = new QList<QString>;
}


Target::Target(const Target& target) : Device()
{
    this->device_name = target.getDeviceName();
    this->setIP(target.getConfig().ip);
    this->setPort(target.getConfig().port);
}



// 设置设备名称
void Target::setDeviceName(QString name)
{
    this->device_name = name;
}




// 获取设备名称
QString Target::getDeviceName() const
{
    return device_name;
}



Target& Target::operator=(const Target& target)
{
    this->device_name = target.getDeviceName();
    this->setIP(target.getConfig().ip);
    this->setPort(target.getConfig().port);

    return *this;
}



